<template>
  <div class="supplier layout-content">
    <a-tabs v-model="tabKey" type="card" @change="tabChange">
      <a-tab-pane key="supplier-common" tab="供应商列表"> </a-tab-pane>
      <!-- <a-tab-pane key="supplier-silence" tab="沉默供应商"> </a-tab-pane> -->
    </a-tabs>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tabKey: undefined
    };
  },
  methods: {
    tabChange(key) {
      this.$router.push({ name: key });
    }
  },
  created() {
    let common = ["supplier-common"];
    let silence = ["supplier-silence"];
    this.tabKey =
      common.indexOf(this.$route.name) !== -1
        ? "supplier-common"
        : silence.indexOf(this.$route.name) !== -1
        ? "supplier-silence"
        : undefined;
  }
};
</script>
